﻿using System;

namespace BSharp.Compiler.Emit
{
	public class LoadRegister : IntermediateInstruction
	{
		public readonly int Register;
		public readonly int Value;

		public LoadRegister (int register, int value)
		{
			Register = register;
			Value = value;
		}

		public override void Visit (IntermediateCompiler compiler)
		{
			compiler.Compile (this);
		}

		public override string ToString ()
		{
			return string.Format ("LOAD_REGISTER r{0}, {1}", Register, Value);
		}
	}
}

